<template>
	<view>
	<!-- 星座 -->
		<picker-view :indicator-style="indicatorStyle" @change="onchange" class="picker-view" >
			<picker-view-column >
				<view class="item" v-for="(item,index) in constellation" :key="index">{{item}}</view>
			</picker-view-column>
		</picker-view>

		<view class="bomPosition">
			<button type="primary" @click="submit">保存</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				indicatorStyle: `height: 50px;`,
				constellation: [
					'高中/中专','大专','大学本科','硕士','博士'
				],
				value: [0],
				type:''
			};
		},
		onLoad(res) {
			if(res.type=='yaoqiu') {
				this.type = res.type
			}else {
				this.type = ''
			}
		},
		methods: {
			onchange(e) {
				this.value = e.detail.value[0]
			},
			submit() {
				if(this.type == 'yaoqiu') {
					uni.$emit('educationYaoqiu', this.constellation[this.value])
					uni.navigateBack({
						delta: 1
					})
				}else {
					uni.$emit('educationTitleFn', this.constellation[this.value])
					uni.navigateBack({
						delta: 1
					})
				}
				
			},
			bindChange(e) {
				
			},
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #fff;
	}
	.picker-view {
		width: 750rpx;
		height: 600rpx;
		margin-top: 20rpx;
		background-color: #f6f6f6 !important;
		/deep/ picker-view-column {
			background-color: #f6f6f6 !important;
		}
	}
	/deep/ picker-view-column {
		background-color: #f6f6f6 !important;
	}

	.item {
		line-height: 100rpx;
		text-align: center;
		font-weight: 600;
		font-size: 32rpx;
	}
</style>
